// 车辆相关类型定义

export interface Vehicle {
  id: number;
  tenantId: number;
  plateNumber: string;
  vehicleType: VehicleType;
  brandModel?: string;
  loadCapacity?: number | null;
  volumeCapacity?: number;
  purchaseDate?: string;
  insuranceExpireDate?: string | null;
  inspectionExpireDate?: string | null;
  vehicleStatus: VehicleStatus;
  vehicleSource?: "COMPANY" | "TEMP";
  remark?: string;
  // 车辆所有者（车主）信息
  ownerName: string;
  ownerPhone: string;
  ownerIdCard?: string;
  ownerLicenseNumber?: string;
  ownerLicenseType?: string;
  ownerLicenseExpireDate?: string;
  ownerAddress?: string;
  createTime: string;
  updateTime: string;
}

export type VehicleType =
  | "VAN" // 厢式货车
  | "FLATBED" // 平板车
  | "REFRIGERATED" // 冷藏车
  | "OTHER"; // 其他

export type VehicleStatus =
  | "AVAILABLE" // 可用
  | "IN_USE" // 使用中
  | "MAINTENANCE" // 维修中
  | "DISABLED"; // 停用

export interface VehicleFormData {
  plateNumber: string;
  vehicleType: VehicleType;
  brandModel?: string;
  loadCapacity?: number | null;
  volumeCapacity?: number;
  purchaseDate?: string;
  insuranceExpireDate?: string | null;
  inspectionExpireDate?: string | null;
  vehicleStatus?: VehicleStatus;
  vehicleSource?: "COMPANY" | "TEMP";
  remark?: string;
  // 车辆所有者（车主）信息
  ownerName: string;
  ownerPhone: string;
  ownerIdCard?: string;
  ownerLicenseNumber?: string;
  ownerLicenseType?: string;
  ownerLicenseExpireDate?: string;
  ownerAddress?: string;
}

// 车辆类型配置
export const VEHICLE_TYPE_CONFIG = {
  VAN: { label: "厢式货车", color: "blue" },
  FLATBED: { label: "平板车", color: "green" },
  REFRIGERATED: { label: "冷藏车", color: "cyan" },
  OTHER: { label: "其他", color: "default" },
};

// 车辆状态配置
export const VEHICLE_STATUS_CONFIG = {
  AVAILABLE: { label: "可用", color: "green" },
  IN_USE: { label: "使用中", color: "blue" },
  MAINTENANCE: { label: "维修中", color: "orange" },
  DISABLED: { label: "停用", color: "default" },
};
